﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Manage.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="web.Manage.Product._default" %>

<%@ Import Namespace="PRO.Common" %>
<%@ Register Assembly="PRO.Controls" Namespace="PRO.Controls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .frm_tab .right { width: 80px; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_PageInfo" runat="server">
    产品管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_Menus" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder_Content" runat="server">
    <form id="form1" runat="server">
        <table>
            <tr>
                <td>
                    <fieldset>
                        <legend>产品搜索</legend>
                        <table class="frm_tab" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="right">分类：</td>
                                <td>
                                    <asp:DropDownList ID="drpClass" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpClass_SelectedIndexChanged"></asp:DropDownList></td>
                                <td class="right">名称：</td>
                                <td>
                                    <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox></td>
                                <td class="right">是否上架：</td>
                                <td>
                                    <asp:DropDownList ID="drpShow" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpShow_SelectedIndexChanged">
                                        <asp:ListItem Value="-1">全部</asp:ListItem>
                                        <asp:ListItem Value="1">已上架产品</asp:ListItem>
                                        <asp:ListItem Value="0">未上架产品</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Button ID="Button1" runat="server" Text="搜索" OnClick="Button1_Click" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td>
                    <table class="tab" cellpadding="0" cellspacing="0" style="width: 800px;">
                        <tr>
                            <th style="width: 33px;">编号</th>
                            <th>产品标题</th>
                            <th style="width: 70px;">所属分类</th>
                            <th style="width: 30px;">上架</th>
                            <%--<th style="width: 40px;">排序</th>--%>
                            <th style="width: 120px;">操作</th>
                        </tr>
                        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                            <ItemTemplate>
                                <tr>
                                    <td><%#Eval("id") %></td>
                                    <td style="text-align: left;"><a href="edit.aspx?id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
                                    <td><%#Eval("ClassName") %></td>
                                    <td>
                                        <%#(Eval("show").ToString().ToBoolean(false))?"√":"<font>×</font>" %>
                                    </td>
                                    <%--<td>
                            <cc1:SortControl OnSortCallBack="SortControl1_SortCallBack" ID="SortControl1" runat="server" SortStyle="Input" ItemID='<%#Eval("id") %>' KeyField="id" TableName="Pro_Product" SortField="sort" Sort='<%#Eval("sort") %>' />
                        </td>--%>
                                    <td>
                                        <a href="edit.aspx?id=<%#Eval("id") %>">编辑</a>
                                        <a target="_blank" href="/product/item/<%#Eval("id").DEC_Encode(PRO.Config.BaseConfigs.DEC_KEY) %>">查看</a>
                                        <asp:LinkButton ID="LinkButton1" CommandArgument='<%#Eval("id") %>' OnClientClick="return confirm('确定删除吗？');" runat="server">删除</asp:LinkButton>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        <tr>
                            <td colspan="6">
                                <cc1:Pager ID="Pager1" PagerLanguage="CH" PagerStyle="Button" runat="server" OnPageIndexChanging="Pager1_PageIndexChanging" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>



    </form>
</asp:Content>
